package chapterfour;

/**
 * Created by Think on 2016/3/17.
 */
class Clothes{ //定义Clothes类
    String color;
    char size;
}
public class Field {
    public static void main(String[] args){
        Clothes sun=new Clothes();
        Clothes spring=new Clothes();//建立Clothes实例
        sun.color="red";
        sun.size='s';
        spring.color="green";
        spring.size='M';//为个别对象的数据成员指定值
        System.out.printf("sun(%s,%c)%n",sun.color,sun.size);
        System.out.printf("spring(%s,%c)%n",spring.color,spring.size);//显示个别对象的数据成员值
    }
}
